#!/usr/bin/env python
#-*- coding:utf-8 -*-

import sys
try:
    import pygtk
    pygtk.require('2.0')
    import gtk
    import gtk.glade
except:
    sys.exit(1)

class appWindow:
    def __init__(self):
        self.widgetTree = gtk.glade.XML('exemplo.glade')

        #Get the Main Window, and connect the 'destroy' event
        self.window = self.widgetTree.get_widget('janelaExemplo')
        if (self.window):
            self.window.connect('destroy', gtk.main_quit)

        #Widgets -------
        self.nomeEntry = self.widgetTree.get_widget('nomeEntry')
        self.emailEntry = self.widgetTree.get_widget('emailEntry')
        #Autoconnect Signals and Callbacks
        self.widgetTree.signal_autoconnect(self)

        self.window.show_all()

    # Callbacks ---------------------------------------------------------------
    def botao_pressionado(self, widget):
        print 'botao_pressionado'

    # Auxiliary Methods -------------------------------------------------------


def main():
    app = appWindow()
    gtk.main()


if __name__ == '__main__':
    main()
